<template>
    <div>
        <h1>登录列表</h1>
        <table class="table" border="1">   
            <thead>
                <tr>
                    <th>编号</th>
                    <th>用户名</th>
                    <th>密码</th>
                    <th>注册时间</th>
                </tr>
            </thead>
            <tbody>
                <tr v-for="user in info" :key="user.U_Lid">
                    <td>{{user.U_Lid}}</td>
                    <td>{{user.U_Lname}}</td>
                    <td>{{user.U_Lpass}}</td>
                    <td>{{user.U_Ldate.substr(0,10)}}</td>
                </tr>
            </tbody>
        </table>

    </div>
</template>
<script setup lang="ts">

import { ref, onMounted } from 'vue';
import axios from 'axios';


const info :any= ref([]);


onMounted(() => {
    getUser();
});

const getUser = () => {
    axios({
        method: 'get',
        url: 'http://localhost:62255/api/Two/UserInfo',
    }).then((res) => {
        info.value = res.data;
    }).catch((err) => {
        console.log(err);
    })
}









</script>
